import matplotlib.pyplot as plt
score=[97,83,85,120,101,88,66,101,85,146,76,96,66,69,68,80,60,49,70,71,56,98,83,100,65,101,110,71,40,55,79,84]
plt.rcParams['font.sans-serif']=['SimHei']
plt.xlabel('分数')
plt.ylabel('学生数量')
plt.title('学生数学成绩分直线图')
plt.hist(score,bins=range(0,150,10),facecolor='blue',edgecolor='red')
plt.show()